﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/BMP_List.master" AutoEventWireup="true"
    CodeFile="Default.aspx.cs" Inherits="Pages_TUser_Default" %>

<asp:Content ID="contentHeader" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="contentSearch" ContentPlaceHolderID="contentPlaceHolderToolBar"
    runat="Server">
    <asp:TextBox runat="server" ID="TUser_Name" Field="Name,UID" Opt="%"></asp:TextBox>
</asp:Content>
<asp:Content ID="contentMain" ContentPlaceHolderID="contentPlaceHolder" runat="Server">
    <asp:GridView ID="gvInfos" runat="server" ClientIDMode="Static">
        <Columns>
            <asp:TemplateField ItemStyle-Width="50">
                <HeaderTemplate>
                    <input id="cbhALL" type="checkbox" onclick="SelectAll('gvInfos', this, 'cbItem');" /><label
                        for="cbhALL">选择</label>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:CheckBox ID="cbItem" runat="server" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:HyperLinkField DataTextField="UID" SortExpression="UID" HeaderText="用户名" DataNavigateUrlFields="ManageEditURI" />
            <asp:BoundField DataField="Name" SortExpression="Name" HeaderText="姓名" />
            <asp:BoundField DataField="CreatTime" SortExpression="CreatTime" HeaderText="创建时间"
                ReadOnly="true" />
            <asp:BoundField DataField="Creator" SortExpression="Creator" HeaderText="创建者" ReadOnly="true" />
            <asp:TemplateField SortExpression="IsEnable" HeaderText="是否启用">
                <ItemTemplate>
                    <%# Eval("IsEnable").ToString().ToLower() == "true" ? "是" : "否"%>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:CheckBox runat="server" ID="TUserInfo_IsEnable" Checked='<%# Eval("IsEnable") %>' />
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="NO" SortExpression="NO" HeaderText="工号" />
            <asp:CommandField ShowEditButton="true" EditText="编辑" HeaderText="编辑" ItemStyle-Width="80" />
            <asp:TemplateField HeaderText="删除" ItemStyle-Width="50">
                <ItemTemplate>
                    <asp:LinkButton ID="lbDelete" Text="删除" CausesValidation="true" CommandName="Delete"
                        OnClientClick="return confirm('确定删除吗？');" runat="server">
                    </asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:HyperLinkField HeaderText="修改" Text="修改" DataNavigateUrlFields="ManageEditURI"
                ItemStyle-Width="50" />
        </Columns>
    </asp:GridView>
</asp:Content>
